package guiCode;

import flexibility.CachedRowSetTableModel;
import flexibility.downloadManager;
import flexibility.userData;
import gui.TeacherMainMenuGUI;
import gui.assignmentsGUI;

import java.sql.SQLException;

import teacher.getFid;
import teacher.getassignment;
import teacher.setNewDate;

import basic.ClientConsole;

import com.sun.rowset.CachedRowSetImpl;

public class Filecode {
	public userData T_Data = new userData();
	public TeacherMainMenuGUI tmm ;
	public ClientConsole teacherConnection=TeacherMainMenuCode.getTeacherConnection();
	public CachedRowSetImpl rs;
	int myID=TeacherMainMenuCode.getMyID();

	public void download(Integer fileID){
		
		downloadManager dm=new downloadManager(teacherConnection,fileID);	
		dm.downloadFile();
		}
	

	public void updateDate(String D,String AssID){
		setNewDate sd=new setNewDate();
		sd.setNewDate(teacherConnection, rs, T_Data, myID,D,AssID);
		
		}
	
	public CachedRowSetImpl getFid(String s1){
		getFid gf=new getFid();
		rs=gf.getFID(teacherConnection, rs, T_Data, myID,s1);
		return rs;
	}
	public CachedRowSetImpl fileStudentID(String sid,String aID){
		getFid gf=new getFid();
		rs=gf.fileStudentID(teacherConnection, rs, T_Data, myID,sid,aID);
		return rs;
	}
	public CachedRowSetImpl fileFeedback(String sid,String aID,int f){
		getFid gf=new getFid();
		rs=gf.fileFeedback(teacherConnection, rs, T_Data, myID,sid,aID,f);
		return rs;
	}
	
	}

